package com.lsp.helper;

import com.lsp.config.ConfigConstant;
import com.lsp.util.PropertiesUtil;

import java.util.Properties;


public final class ConfHelper {

    /**
     * 加载配置文件
     */
    private static final Properties CONFIG_PROPS = PropertiesUtil.loadProperties(ConfigConstant.CONFIG_FILE);

    public static String getJdbcDriver(){
        return PropertiesUtil.getString(CONFIG_PROPS, ConfigConstant.JDBC_DRIVER);
    }

    public static String getJdbcUrl(){
        return PropertiesUtil.getString(CONFIG_PROPS,ConfigConstant.JDBC_URL);
    }

    public static String getJdbcUsernnme(){
        return PropertiesUtil.getString(CONFIG_PROPS,ConfigConstant.JDBC_USERNAME);
    }

    public static String getJdbcPassword(){
        return PropertiesUtil.getString(CONFIG_PROPS,ConfigConstant.JDBC_password);
    }

    public static String getAppBasePackage(){
        return PropertiesUtil.getString(CONFIG_PROPS,ConfigConstant.APP_BASE_PACKAGE);
    }
}
